// Vuex store 定义
import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

const store = new Vuex.Store({
    state: {
        menuList: null,
        token: null,
        baseUrl: null,
        permitId: null,
        action: "/apis/admin/upload/file"
    },
    getters: {
        getMenuData(state) {
            return state.menuList;
        }
    },
    mutations: {
        setMenuData(state, data) {
            state.menuList = data;
        },
        setToken(state, token) {
            state.token = token
        },
        setBaseUrl(state, baseUrl) {
            state.baseUrl = baseUrl
        },
        setPermitId(state, permitCode) {
            state.permitId = permitCode
        },
    },
    actions: {

    },

});

export default store;
